/*
 * @Author: 陈俊升 761723995@qq.com
 * @Date: 2023-05-11 18:11:41
 * @LastEditors: 陈俊升 761723995@qq.com
 * @LastEditTime: 2024-03-01 15:44:24
 * @FilePath: /hr_new_vue3/src/apis/management/human/humanChange/leave/index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/* 人事-黑名单管理api */

import { ajaxService } from '@/utils/request';

const env = import.meta.env;
// const baseURL = env.VITE_API_BASE_URL;
const baseURL = env.VITE_DEV_BASE_URL;
const baseURL2 = env.VITE_APP_BASE_URL;

// 新增黑名单
export function PostBlacklist(data: any) {
  return ajaxService(
    {
      url: '/hr/personnel_matters/roster/black',
      method: 'post',
      baseURL,
      data
    },
    {
      mode: 'success',
      message: '新增成功'
    }
  );
}

// 修改黑名单
export function PutBlacklist(data: any) {
  return ajaxService(
    {
      url: '/hr/personnel_matters/roster/black',
      method: 'put',
      baseURL,
      data
    },
    {
      mode: 'success',
      message: '修改成功'
    }
  );
}

// 获取黑名单列表
export function GetBlacklist(params: any) {
  return ajaxService({
    url: '/hr/personnel_matters/roster/black',
    method: 'get',
    baseURL,
    params
  });
}

// 修改黑名单
export function DelBlacklist(data: { ids: number[] }) {
  return ajaxService(
    {
      url: '/hr/personnel_matters/roster/black',
      method: 'delete',
      baseURL,
      data
    },
    {
      mode: 'success',
      message: '删除成功'
    }
  );
}
